<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<jsp:include  page="../common/file.jsp"/>
<head>
</head>
<body class="dialog_body">
<form id="submit_form" action="${pageContext.request.contextPath}/menu/insert" method="post" target="_parent">
<div class="dialog-two-div">
	<table class="dialog-two-table">
		<tr>
			<td class="dialog-td-right">上级菜单</td>
			<td class="dialog-td-left">
				 <select class="select" id="parentId" name="parentId" style="width: 200px; height: 30px;"></select>
			</td>
		</tr>
		<tr>
			<td class="dialog-td-right">菜单名称</td>
			<td class="dialog-td-left">
				<input type="text" id="menuName" name="menuName" maxlength="20" placeholder="请输入菜单名称" validate="not-null,special-char"/>
				<span class="redtext">*</span>
				<div style="clear:both;display:none"></div>
				<span id="sameMenuName" style="margin-left:0px"></span>
			</td>
		</tr>
		<tr id="dataIdDl">
			<td class="dialog-td-right">请求模块</td>
			<td class="dialog-td-left">
				<input type="text" id="dataId" name="dataId" maxlength="20" placeholder="请输入请求模块"/>
			</td>
		</tr>
		<tr id="dataHrefDl">
			<td class="dialog-td-right">请求路径</td>
			<td class="dialog-td-left">
				<input type="text" id="dataHref" name="dataHref" maxlength="50" placeholder="请输入请求路径"/>
			</td>
		</tr>
		<tr id="iconPathDl">
			<td class="dialog-td-right">图标路径</td>
			<td class="dialog-td-left">
				<input type="text" id="iconPath" name="iconPath" maxlength="100" placeholder="请输入图标路径"/>
			</td>
		</tr>
		<tr>
			<td class="dialog-td-right">状态</td>
			<td class="dialog-td-left">
				<select class="chosen-select form-control" id="status" name="status">
			        <option value="1">有效</option>
					<option value="0">无效</option>
		        </select>
			</td>
		</tr>
		<tr>
			<td class="dialog-td-right">类型</td>
			<td class="dialog-td-left">
				<select class="chosen-select form-control" id="type" name="type">
			        <option value="1">菜单</option>
					<option value="2">按钮</option>
		        </select>
			</td>
		</tr>
		<tr>
			<td class="dialog-td-right">序列</td>
			<td class="dialog-td-left">
				<input type="text" id="orderNo" name="orderNo" maxlength="10" placeholder="请输入序列" validate="not-null,pos-int-no0"/>
				<span class="redtext">*</span>
				<div style="clear:both;display:none"></div>
				<span id="sameOrderNo" style="margin-left:0px"></span>
			</td>
		</tr>
	</table>
	<table class="dialog-two-table dialog-table-submit">
		<tr class="dialog-two-button">
			<td colspan=4 >
				<button type="button" class="btn btn-warning submit-btn">提 交</button>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<button type="button" class="btn btn-default cancel-btn" target="_self">返 回</button>
			</td>
		</tr>
	</table>
</div>
</form>
<script type="text/javascript">
	//下拉菜单树(上级菜单)
	var ctxt = "${pageContext.request.contextPath}";
	$('#parentId').combotree({
	    url : ctxt+'/menu/findAllTree',
	    parentField : 'pid',
	    lines : true,
	    panelHeight : 'auto'
	});
	
	//提交保存
	function submitForm() {
		
		$(".submit-btn").unbind("click");
		$('#submit_form').submit();
		
		return true;
	}
	
	//关闭窗口
	$('.cancel-btn').click(function() {
		art.dialog.close();
	});

	//下拉框初始化图形
	$(".chosen-select").chosen({disable_search_threshold: 10});
</script>
</body>

  
